package com.shycloud.mido.opter.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shycloud.mido.member.api.entity.BasicGoodsInfo;
import com.shycloud.mido.opter.api.entity.StockDeviceInfo;
import com.shycloud.mido.opter.api.entity.StockSaleOrder;
import com.shycloud.mido.opter.api.vo.GenBatchUdidVO;
import com.shycloud.mido.opter.api.vo.StockProcessDetailVO;
import com.shycloud.mido.opter.api.vo.StockSaleOrderDetailVO;
import com.shycloud.mido.opter.api.vo.StockSaleOrderVO;
import com.shycloud.mido.opter.api.vo.StockWarehouseDetailVO;

import java.util.List;
import java.util.Map;

/**
 * @author Xiaoxing Yu
 * @date 2020/9/24
 **/
public interface StockOrderService extends IService<StockSaleOrder> {

	Map addSaleOrder(StockSaleOrderVO saleOrderVO);

	Boolean addSaleOrderDetail(StockSaleOrderDetailVO detailVO);

	Boolean editSaleOrder(StockSaleOrderVO editVO);

	Boolean deleteSaleOrder(StockSaleOrderVO saleOrderVO);

	List<StockSaleOrder> getSaleOrders(String commitStatus, String outStatus);

	IPage<StockSaleOrderVO> pageSaleOrders(Page page,
			String commitStatus, String outStatus,
			String createdBy, String outType,
			String startDate, String endDate,
			String searchName, String comments, String processStatus, String orderNo);

	Boolean commitSaleOrder(StockSaleOrderVO saleOrderVO);

	Boolean sendOutOrder(StockSaleOrderVO saleOrderVO);

	List<Map<String, String>> generateBatchUdid(GenBatchUdidVO batchUdidVO);


	StockDeviceInfo getUdidInfo(String udid);

	Boolean deleteUdidByOrderNo(GenBatchUdidVO batchUdidVO);

	Boolean processService(StockProcessDetailVO processDetailVO);

	IPage<StockSaleOrderVO> pageProcessList(Page page,
			String commitStatus, String outStatus,
			String createdBy, String outType,
			String startDate, String endDate,
			String searchName, String comments);

	IPage<StockProcessDetailVO> pageProcessDetail(Page page, String startDate, String endDate,
			String createdBy, String processType, Integer warehouseId,
			String goodsName, String comments);

	List<BasicGoodsInfo> getHardwareGoods();

	IPage<StockWarehouseDetailVO> pageGoodsStockAmount(Page page, Integer warehouseId,
			Integer goodsId, Integer categoryId);

	Map getAllStockInfo();

	List<String> genUDID(String type, Integer count);

	Boolean stopUdid(String udid, String orderNo);
}
